import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import router from './router'
import App from "./App.vue";
// 导入字体图标
// import './assets/font_icon/iconfont.css'

import axios from "axios";
import { Message } from "element-ui";
import './assets/css/public.css'
import './icons' // icon

axios.defaults.baseURL = "http://localhost:8686/frms/"
Vue.prototype.$http = axios

// Vue.directive('focus', {
//   // eslint-disable-next-line no-unused-vars
//   inserted (el, binding, vnode) {
//     // 聚焦元素
//     el.focus()
//   }
// })
// 注册一个全局自定义指令 `v-focus`
Vue.directive('focus', {
  // 当被绑定的元素插入到 DOM 中时……
  inserted: function (el) {
    // 聚焦元素
    el.focus()
  }
})

Vue.use(ElementUI);
Vue.prototype.$message = Message

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
